export const eventXy = () => {
  var posX = 0,
    posY = 0;
  var event = event || window.event;
  if (event.pageX || event.pageY) {
    posX = event.pageX;
    posY = event.pageY;
  } else if (event.clientX || event.clientY) {
    posX =
      event.clientX +
      document.documentElement.scrollLeft +
      document.body.scrollLeft;
    posY =
      event.clientY +
      document.documentElement.scrollTop +
      document.body.scrollTop;
  }
  return {
    posX: posX,
    posY: posY,
  };
};
